package game.view.panel.game
{
	import flash.events.*;
	import flash.text.*;
	import game.view.base.gamepanel.ExplainPanelUI;
	import com.base.type.LayerEnum;
	import game.GlobalConfig;
	import game.controller.mediator.ExplainPanelMediator;
	import game.model.type.*;
	import game.util.*;
	import game.model.GameData;
	import morn.App;
	import morn.core.components.Box;
	import morn.core.components.*;
	import morn.core.handlers.Handler;
	public class ExplainPanel extends ExplainPanelUI
	{
		public function ExplainPanel()
		{
			super();
			setLayerType(LayerEnum.LAYER_SINGLE);
			setMediatorClass(ExplainPanelMediator);
		}
		override protected function initialize():void
		{
			super.initialize();
			closeBtn.addEventListener(MouseEvent.CLICK,closeBtnClick);
		}
		override protected function updateData(data:Object):void
		{
			
		}
		override protected function reset():void
		{
			super.reset();
			trace('ExplainPanel reset');
			txt1.text='';
			txt1.format.leading=2;
			var myStr:String="<font size='14'>1、每次点击“向前跳跃”都有50%概率进入下一关，每关都有对应的礼物奖励。</font><br><br>";
			myStr+="<font size='14'>2、每次闯关需花费3000呱元，当进入新关卡时可领取对应奖励或选择继续挑战，继续挑战则放弃当前关卡奖励，" +
            "若接下来闯关失败则奖励归零，重新开始。失败关卡再次挑战时概率会大幅提升。</font><br><br>";
			myStr+="3、关卡概率";
			txt1.text=myStr;
			txt1.height=170;
			
			gailBox.y=txt1.y+txt1.height;
			//this['level6'].text='第6关                        50%                     礼物名称                 10000';
			
			
			txt2.y=gailBox.y+gailBox.height+20;
			var myStr2:String="<font size='14'>4、游戏获得的礼物在背包中时限为7天，请尽快使用礼物</font><br><br>";
			myStr2+="<font size='14'>5、本活动仅供娱乐，用户所获产出不可反向兑换成现金或有价值商品，不得用于任何形式的盈利活动</font><br><br>";
			myStr2+="<font size='14'>6、本活动解释权归平台所有</font>";
			txt2.text=myStr2;
			txt2.height=130;
		
		}
		
		private function itemListChildren(item:Component, index:int):void{
			
		}
		private function closeBtnClick(e:MouseEvent):void{
			ZooMain.view.closeView(ExplainPanel);
		}
		override protected function dispose():void{
			closeBtn.removeEventListener(MouseEvent.CLICK,closeBtnClick);
			super.dispose();
		}
	}
}